﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace Script.UI.Component
{
    public interface IHistogramDisplay
    {
        float MinValue { get; set; }
        float MaxValue { get; set; }
        float CurrentValue { get; set; }
        void Display();

    }

   

    public class HistogramDisplay : MonoBehaviour
    {
        public float SpecificMinValue
        {
            get
            {
                return MinValue;
            }
            set
            {
                MinValue = value;
            }
        }
        public float SpecificMaxValue
        {
            get
            {
                return MaxValue;
            }
            set
            {
                MaxValue = value;
            }
        }

        private float m_fInnerMinValue;
        private float m_fInnerMaxValue;
        public float MinValue
        {
            get
            {
                return m_fInnerMinValue;
            }
            set
            {
                m_fInnerMinValue = value;
            }
        }
        public float MaxValue
        {
            get
            {
                return m_fInnerMaxValue;
            }
            set
            {
                m_fInnerMaxValue = value;
            }
        }
        private float m_fCurrentValue = 0;
        public float CurrentValue
        {
            get
            {
                return m_fCurrentValue;
            }
            set
            {
                m_fCurrentValue = value;
                Display();
            }
        }

        void Start()
        {
            MinValue = SpecificMinValue;
            MaxValue = SpecificMaxValue;
            Display();
        }


        public virtual void Display()
        {

        }
    }


}

